package com.samehope.ar.service;

import com.samehope.ar.dto.PatrolPointCountParam;
import com.samehope.ar.dto.PointAddParam;
import com.samehope.ar.dto.PointUpdateParam;
import com.samehope.ar.entity.PatrolPoint;
import com.baomidou.mybatisplus.extension.service.IService;
import com.samehope.ar.vo.*;

import java.util.List;

/**
 * <p>
 * 巡检点 服务类
 * </p>
 *
 * @author Zhang Luo
 * @since 2019-12-23
 */
public interface IPatrolPointService extends IService<PatrolPoint> {

    /**
     * 获取巡检点树结构
     * @param condition
     * @return
     */
    List<TreeDataVO> getPointTree(String condition);

    /**
     * 获取巡检点明细
     * @param pointId
     * @return
     */
    PointDetailVO detail(Long pointId);

    /**
     * 删除巡检点
     * @param pointId
     */
    void deletePoint(Long pointId);

    /**
     * 新增巡检点
     * @param param
     */
    Long add(PointAddParam param);

    /**
     * 更新巡检点
     * @param param
     */
    void update(PointUpdateParam param);

    /**
     * 统计巡检历史
     * @param param
     * @return
     */
    PatrolPointCountVO countByPoint(PatrolPointCountParam param);

    /**
     * 统计巡检点问题统计
     * @param param
     * @return
     */
    ChartArrayDataVo countByProblemType(PatrolPointCountParam param);

    /**
     * 统计巡检点巡检项
     * @param param
     * @return
     */
    List<ChartDataVo> countByProblemItem(PatrolPointCountParam param);

    /**
     * 获取巡检点树结构, 没有点位的分类不显示
     * @return
     */
    List<TreeDataVO> getPointTreeWithFullNode();
}
